import javax.swing.*;
import java.awt.*;

public class SunPen extends Pen {

  String name = "SunPen";
  int anchorX;
  int anchorY;
  private Graphics currentGraphics;
 

  public SunPen() {
    this.inputPanel = new JPanel();
    this.inputPanel.setBackground(Color.orange);
  }

  public String getName(){
    return this.name;
  }
  public void drawPreview(){
    return;
  }

  public void select(){
    return;
  }
  
  public void penUp(int x, int y){
    currentGraphics.drawLine(x,y, anchorX, anchorY);
  }
  
  public void penDown(int x, int y){
    currentGraphics = this.kanvasImage.createGraphics();
    currentGraphics.setColor(Color.black);
    anchorX = x;
    anchorY = y;
  }
  
  public void penDrag(int x, int y){ // store old values in Pen class, update and draw line between.
    currentGraphics.drawLine(x,y, anchorX, anchorY);
  }

}
